Virtualization technology enables a single host running a virtual machine monitor to present multiple abstractions of the host, such that the underlying hardware of the host appears as one or more independently operating virtual machines. Each virtual machine may therefore function as a self-contained platform. Often, virtualization technology is used to allow multiple operating systems to coexist and execute apparently simultaneously on the same hardware platform.
Emulation technology is used to emulate features of one hardware platform in software that executes on a (usually) different hardware platform. For instance, emulation may be used to test programs designed to execute on a future processor that is not yet in production by executing the programs on an emulator for the future processor that is capable of execution on a platform based on a current processor.
A specific case of emulation is one where one model of a base processor is being emulated on another model of the same base processor. In this type of situation, most instructions execute identically on the two models. However there may be some instructions that while being valid instructions for both processor models, execute with different results on the two processor models, and therefore must be emulated when emulating one model of a processor on a physical processor that is a different model. Examples of such instructions are instructions that access to model-specific registers of the processor, access identifying information of the processor, and access model-specific ports of the processor or another system device.
While emulation of completely new instructions for a new processor may be performed on an existing processor by trapping an illegal instruction event, which would occur when the processor attempts to execute the illegal instruction, the emulation of existing instructions that are different in their behavior but not invalid in a new model of a processor cannot be performed by this technique, because the instruction would not generate an illegal instruction event.
Another alternative for emulation of a new model of a processor is to reprogram an older model of the processor at a microcode level to change its behavior to simulate that of the new model. Microcode emulation is generally complex, has high coding effort requirements, and may not be feasible if functionality of the new model of the processor is not supported by the old model's hardware, or if the processor does not have a microcode-based instruction set.